1. Field
The disclosure relates generally to a computer implemented method, a computer program product accessible from a computer-usable or computer-readable medium, and a data processing system. More specifically, the disclosure relates to a computer implemented method, a computer program product accessible from a computer-usable or computer-readable medium, and a data processing system for creating custom timers through the use of a net-timer daemon.
2. Description of the Related Art
The Internet, also referred to as an “internetwork”, is a set of computer networks, possibly dissimilar, joined together by means of gateways that handle data transfer and the conversion of messages from a protocol of the sending network to a protocol used by the receiving network. When capitalized, the term “Internet” refers to the collection of networks and gateways that use the TCP/IP suite of protocols. The Internet may carry information and provide services. The information and services include, for example, electronic mail, online chat services, file transfers, web pages, and other resources.
The availability of an accurate and fine-grained timer service is crucial to the efficient implementation of many networking protocols. Timers are used to determine when “timeouts” occur, i.e., when a timer expires, indicating that a predetermined amount of time has passed and that therefore an action or computer function should be performed. For example, a response timeout occurs when no response from a sought device is received over the network within a predetermined amount of time after sending a request. The occurrence of a timeout can indicate to a device that it should stop waiting for a response, retransmit data, sever a connection to another device on the network, or perform one or more other functions.
Typically in a networking system, each connection of a reliable network protocol maintains several active timers to keep track of different timeouts supported by the protocol. In such protocols, multiple timers are maintained for each particular network connection to control the state of the connection based on predetermined conditions. For example, in the Transmission Control Protocol (TCP), one timer can be a retransmission timer that keeps track of the time elapsed after a request or data is transmitted to a connected device and before an acknowledgement is received from the connected device, so that the sending device can retransmit information if a timeout occurs. An idle timer can keep track of the time since any data frame or signal was last received on a particular connection, such that if an idle or “stale” timeout occurs, the connection can be shut down due to lack of activity. A keepalive timer can be started after an idle timeout occurs to keep track of the time elapsed since sending a test signal to test if the other computer system is still functioning and connected, so that if a timeout occurs before any response is received, the other computer system is considered non-functioning, or non-communicative. An acknowledgement delay timer can count down a predetermined duration of time after receiving a packet of data, thereby causing a delay for acknowledging the reception of the packet so that a single acknowledgement can be later sent after receiving multiple close-together packets, thus promoting a reduction in the amount of unnecessary acknowledgments. All these timers can be maintained for each network connection. For example, networking functions like server load balancing and layer-4 protocol termination require such multiple timers to be maintained per connection of the subject device to another device over the network.
Setting, resetting, and expiration of these timers is typically supported and maintained by a system timer task or service. In many conventional systems, a counter is maintained for each connection timer associated with each connection, the counters being stored in a memory control block associated with each connection in a connection table. The timer task periodically examines the entries of the entire connection table and decrements all the counters for the active connections. For example, the timer task may periodically examine the entries of the connection table every 500 milliseconds. A timeout is declared when the value of a counter becomes zero. This method requires several memory-related accesses per connection, such as acquiring a lock to the connection control block so that other tasks may not access the block, a read of the counter value, write to decrement the counter value, and an unlock operation to free the control block for other tasks.
Most information technology companies are heavily dependent on the efficient exchange of information between machines in the local intranet and with the internet in general. Tuning of the networking parameters becomes a very critical part of maintaining this high efficiency. Different operating systems allow varying degrees of flexibility to cater for the differing requirements of applications.
Most operating systems, including AIX®, allow tuning of various TCP/IP related timers on a system wide and sometimes on a per connection basis. AIX® is a registered trademark of International Business Machines, Inc. In AIX®, the global values are set using the “no” command. If an individual application needs to set a timer value to something other than the system-wide value, then operating systems typically give the option of setting it programmatically using “socket options”. However, this is only feasible if the user has access to the source code of the application and can modify it at will.